<%@ page import="com.opeace.Adult" %>

<div class="fieldcontain ${hasErrors(bean: adultInstance, field: 'firstName', 'error')} ">
	<label for="firstName">
		<g:message code="adult.firstName.label" default="First Name" />
		
	</label>
	<g:textField name="firstName" value="${adultInstance?.firstName}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: adultInstance, field: 'middleName', 'error')} ">
	<label for="middleName">
		<g:message code="adult.middleName.label" default="Middle Name" />
		
	</label>
	<g:textField name="middleName" value="${adultInstance?.middleName}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: adultInstance, field: 'lastName', 'error')} ">
	<label for="lastName">
		<g:message code="adult.lastName.label" default="Last Name" />
		
	</label>
	<g:textField name="lastName" value="${adultInstance?.lastName}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: adultInstance, field: 'gender', 'error')} required">
	<label for="gender">
		<g:message code="adult.gender.label" default="Gender" />
		<span class="required-indicator">*</span>
	</label>
	<g:select name="gender" from="${com.opeace.Person$Gender?.values()}" keys="${com.opeace.Person$Gender.values()*.name()}" required="" value="${adultInstance?.gender?.name()}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: adultInstance, field: 'birthDate', 'error')} required">
	<label for="birthDate">
		<g:message code="adult.birthDate.label" default="Birth Date" />
		<span class="required-indicator">*</span>
	</label>
	<g:datePicker name="birthDate" precision="day"  value="${adultInstance?.birthDate}"  />
</div>

<div class="fieldcontain ${hasErrors(bean: adultInstance, field: 'addressLine', 'error')} ">
	<label for="addressLine">
		<g:message code="adult.addressLine.label" default="Address Line" />
		
	</label>
	<g:textField name="addressLine" value="${adultInstance?.addressLine}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: adultInstance, field: 'addressAPT', 'error')} ">
	<label for="addressAPT">
		<g:message code="adult.addressAPT.label" default="Address APT" />
		
	</label>
	<g:textField name="addressAPT" value="${adultInstance?.addressAPT}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: adultInstance, field: 'addressCity', 'error')} ">
	<label for="addressCity">
		<g:message code="adult.addressCity.label" default="Address City" />
		
	</label>
	<g:textField name="addressCity" value="${adultInstance?.addressCity}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: adultInstance, field: 'addressState', 'error')} required">
	<label for="addressState">
		<g:message code="adult.addressState.label" default="Address State" />
		<span class="required-indicator">*</span>
	</label>
	<g:select name="addressState" from="${com.opeace.Person$State?.values()}" keys="${com.opeace.Person$State.values()*.name()}" required="" value="${adultInstance?.addressState?.name()}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: adultInstance, field: 'addressZip', 'error')} required">
	<label for="addressZip">
		<g:message code="adult.addressZip.label" default="Address Zip" />
		<span class="required-indicator">*</span>
	</label>
	<g:field type="number" name="addressZip" required="" value="${fieldValue(bean: adultInstance, field: 'addressZip')}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: adultInstance, field: 'employer', 'error')} ">
	<label for="employer">
		<g:message code="adult.employer.label" default="Employer" />
		
	</label>
	<g:textField name="employer" value="${adultInstance?.employer}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: adultInstance, field: 'homePhone', 'error')} ">
	<label for="homePhone">
		<g:message code="adult.homePhone.label" default="Home Phone" />
		
	</label>
	<g:textField name="homePhone" value="${adultInstance?.homePhone}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: adultInstance, field: 'workPhone', 'error')} ">
	<label for="workPhone">
		<g:message code="adult.workPhone.label" default="Work Phone" />
		
	</label>
	<g:textField name="workPhone" value="${adultInstance?.workPhone}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: adultInstance, field: 'careerInterest', 'error')} required">
	<label for="careerInterest">
		<g:message code="adult.careerInterest.label" default="Career Interest" />
		<span class="required-indicator">*</span>
	</label>
	<g:select name="careerInterest" from="${com.opeace.Adult$CareerInterest?.values()}" keys="${com.opeace.Adult$CareerInterest.values()*.name()}" required="" value="${adultInstance?.careerInterest?.name()}"/>
</div>

